<?php /* Smarty version 2.6.16, created on 2007-05-16 15:01:34
         compiled from /home/.batly/roamzero/Framework/Site/Peopletab/Templates/Default/templates/People/CpPeople.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', '/home/.batly/roamzero/Framework/Site/Peopletab/Templates/Default/templates/People/CpPeople.tpl', 54, false),)), $this); ?>
<div id="subNav">
<?php echo $this->_tpl_vars['peopleNavList']; ?>

</div>

<?php if ($this->_tpl_vars['errors']): ?>
<div class="errorMessage">
<?php $_from = $this->_tpl_vars['errors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['error']):
?>
<span><?php echo $this->_tpl_vars['error']; ?>
</span><br />
<?php endforeach; endif; unset($_from); ?>
</div>
<?php endif; ?>
	
<?php if ($this->_tpl_vars['noResults']): ?>
	<p class="block"><?php echo $this->_tpl_vars['noResults']; ?>
</p>
<?php else: ?>
	<?php if ($this->_tpl_vars['pager']->links): ?>
		<div class="pager">
		<?php echo $this->_tpl_vars['pager']->links; ?>

		</div>
	<?php endif; ?>
<?php echo '
<script>
$(document).ready(function(){
    $(".newMessageButton").unbind().bind("click", function(){Peopletab.modal.initModal(
		{modal: false, 
		 width: 500, 
		 height: 450,
		 modalID: "newMessage",
		 ajax: $(this).attr("href")}
	); return false});
		
	$(".newMessageLink").unbind().bind("click", function(){Peopletab.modal.initModal(
		{modal: false, 
		 width: 500, 
		 height: 450,
		 modalID: $(this).attr("id"),
		 ajax: $(this).attr("href")}
	); return false});
});
</script>
'; ?>

	<table border="0" id="cpPeopleTable" class="cpTable" width="100%">
		<tr class="cpTableHeader">
			<td><a href ="<?php echo $this->_tpl_vars['sortLinks']['userName']; ?>
">User Name</a></td>
			<td><a href ="<?php echo $this->_tpl_vars['sortLinks']['siteDomain']; ?>
">Domain</a></td>
			<td><a href ="<?php echo $this->_tpl_vars['sortLinks']['dateLastLogin']; ?>
">Last Login</a></td>
			<td></td>
			<td></td>
		</tr>
	<?php $_from = $this->_tpl_vars['people']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['person']):
?>
		<tr valign="top" class="cpTableRow">
			<td><a href="http://<?php echo $this->_tpl_vars['person']['siteDomain']; ?>
/<?php echo $this->_tpl_vars['person']['userName']; ?>
"><?php echo $this->_tpl_vars['person']['userName']; ?>
</a></td>
			<td><?php echo $this->_tpl_vars['person']['siteDomain']; ?>
</td>
			<td><?php if ($this->_tpl_vars['person']['dateLastLogin']):  echo ((is_array($_tmp=$this->_tpl_vars['person']['dateLastLogin'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%D %I:%M %p") : smarty_modifier_date_format($_tmp, "%D %I:%M %p"));  else: ?>unknown<?php endif; ?></td>
			<td><?php if (! $this->_tpl_vars['watchedBy']): ?><a href="<?php echo $this->_tpl_vars['request']->getHTTPPath(); ?>
?unwatch=<?php echo $this->_tpl_vars['person']['idSiteUser']; ?>
">Unwatch</a><?php endif; ?></td>
			<td><a href="/<?php echo $this->_tpl_vars['request']->ownerName; ?>
/CP/Messages/new?to=<?php echo $this->_tpl_vars['person']['idSiteUser']; ?>
" class="newMessageLink" id="to<?php echo $this->_tpl_vars['person']['idSiteUser']; ?>
">Message</a></td>
		</tr>
	<?php endforeach; endif; unset($_from); ?>
	</table>
	<?php if ($this->_tpl_vars['pager']->links): ?>
		<div class="pager">
		<?php echo $this->_tpl_vars['pager']->links; ?>

		</div>
	<?php endif;  endif; ?>